1. Field of the Invention
The present invention is directed to computer systems; and more particularly, it is directed to utilization of graphics processors associated with computer systems for anti-aliasing operations.
2. Description of the Related Art
As the power and complexity of personal computer systems increase, graphics operations are increasingly being performed by dedicated graphics rendering devices referred to as graphics processing units (GPUs). As used herein, the terms “graphics processing unit” and “graphics processor” are used interchangeably. GPUs are often used in removable graphics cards that are coupled to a motherboard via a standardized bus (e.g., AGP or PCI Express). GPUs may also be used in game consoles and in integrated graphics solutions (e.g., for use in some portable computers and lower-cost desktop computers). Although GPUs vary in their capabilities, they may typically be used to perform such tasks as rendering of two-dimensional (2D) graphical data, rendering of three-dimensional (3D) graphical data, accelerated rendering of graphical user interface (GUI) display elements, and digital video playback. A GPU may implement one or more application programmer interfaces (APIs) that permit programmers to invoke the functionality of the GPU.
To reduce demands on central processing units (CPUs) of computer systems, GPUs may be tasked with performing operations that would otherwise contribute to the CPU load. Accordingly, modern GPUs are typically implemented with specialized features for efficient performance of common graphics operations. For example, a GPU often includes a plurality of execution channels that can be used simultaneously. A GPU may also include dedicated structures or built-in program instructions for anti-aliasing rendered objects. Anti-aliasing is any technique for minimizing the jagged, pixilated, or “aliased” edges of objects. Typically, aliasing occurs on objects with non-orthogonal edges, and anti-aliasing may be used to provide a smoother appearance for those edges on a display screen or other rendered image. GPUs with dedicated anti-aliasing features often use techniques such as multi-sampling and super-sampling. However, these techniques may require extensive use of the GPU's built-in memory and resources. Additionally, these techniques are approximations that may not result in high-quality anti-aliasing.
An alternative approach developed by Eric Chan (“Fast Antialiasing Using Prefiltered Lines On Graphics Hardware,” Massachusetts Institute of Technology, Feb. 28, 2004; also published as “Fast Prefiltered Lines,” GPU Gems 2, pages 345-359) described a technique for anti-aliasing of thin lines using a GPU. The Chan technique involves drawing the line with its width increased by a fixed amount, executing a pixel shader program on the GPU to index into a one-dimensional texture containing an anti-aliasing function, and modifying the intensity of each pixel so that pixels near the center of the line have the highest intensity while pixels near the edge have the lowest intensity. An anti-aliasing function can be calculated once for a number of samples and stored in the one-dimensional texture for efficient re-use. However, because the anti-aliasing function is applied to the entire line, regardless of its thickness, this prefiltered line technique is limited in scope.